1 # -*- coding: utf-8 -*-
2 from osv
import fields
, osv
5 _name
= 'bikecoop.partner.theme'
6 _description
= 'Themes that could be related to a partner'
9 'code': fields
.char('Code', size
=8, help='Code of the occupation'),
10 'name': fields
.char('Name', size
=128, help='Name of the job or studies', required
=True),
11 'domain': fields
.char('Domain', size
=64, help='Domain for filtering results'),
12 'active': fields
.boolean('Active', help='If check, this object is always available'),
16 'active': lambda *a
: 1,
22 class Partner(osv
.osv
):
23 _inherit
= 'res.partner'
26 'associate_members': fields
.one2many('res.partner', 'associate_member', 'Associate members', help='Members who are associated to this partner.'),
27 'nationality_id': fields
.many2one('res.country', 'Nationality', help='Partner\'s nationality if he is a person'),
28 'occupation_id': fields
.many2one('bikecoop.partner.theme', 'Occupation', help='Main occupation of this partner'),
29 'volunteer_ids': fields
.many2many('bikecoop.partner.theme', 'res_partner_bikecoop_theme_rel', 'partner_id', 'theme_id', 'What kind of volunteer activities you want to do with us?'),
34 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: